package com.anjiebang.intercepter;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/**
 * app拦截路径配置
 * Created by laiyanlin on 2018/4/8.
 */
@Configuration
public class InterceptorConfig extends WebMvcConfigurerAdapter {

    @Autowired
    private AppInterceptor appInterceptor;

    /**
     * 添加拦截
     */
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
       /* // app通用拦截
        registry.addInterceptor(appInterceptor)
                .addPathPatterns("/user*//**");*/
    }
}
